﻿CollectSourceFiles(${CMAKE_CURRENT_SOURCE_DIR} PRIVATE_SOURCES)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})

ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
add_compile_options(-DHPSOCKET_EXPORTS)

#SET(CMAKE_MFC_FLAG 2)									        # 0:Use Standard Windows; 1: Use MFC in a Static Library; 2: Use MFC in a Shared DLL
#if(CMAKE_MFC_FLAG EQUAL 2)										# use MFC as Shared DLL
	#ADD_DEFINITIONS(-D_AFXDLL)
#endif()
add_library (hpsocket STATIC ${PRIVATE_SOURCES})

target_include_directories(hpsocket 
    PUBLIC 
		${CMAKE_CURRENT_SOURCE_DIR}/include
		${CMAKE_CURRENT_SOURCE_DIR}/src)

target_link_libraries(hpsocket PRIVATE emoney-core-interface )
target_link_libraries(hpsocket PUBLIC ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(hpsocket PROPERTIES FOLDER "dep")
set_property(TARGET hpsocket PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")